package com.cy.pojo;

import org.springframework.stereotype.Repository;

import java.util.ArrayList;

//分页查询
@Repository
public class PageBean<T> {
    private ArrayList<T>rows =new ArrayList<>();
    private int totalCount;

    public PageBean() {
    }

    public PageBean(ArrayList<T> rows, int totalCount) {
        this.rows = rows;
        this.totalCount = totalCount;
    }

    /**
     * 获取
     * @return rows
     */
    public ArrayList<T> getRows() {
        return rows;
    }

    /**
     * 设置
     * @param rows
     */
    public void setRows(ArrayList<T> rows) {
        this.rows = rows;
    }

    /**
     * 获取
     * @return totalCount
     */
    public int getTotalCount() {
        return totalCount;
    }

    /**
     * 设置
     * @param totalCount
     */
    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public String toString() {
        return "PageBean{rows = " + rows + ", totalCount = " + totalCount + "}";
    }
}
